package com.trex.modules.tbl.kclb.entity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 扣车原因Entity
 * @author jy
 * @version 2022-12-06
 */
@Table(name="tbl_zd_kcyy", alias="a", label="扣车原因信息", extWhereKeys="extWhere", columns={
		@Column(name="rec_id", attrName="recId", label="主键", isPK=true),
		@Column(name="fault_code", attrName="faultCode", label="原因编码"),
		@Column(name="fault_name", attrName="faultName", label="原因", queryType=QueryType.LIKE),
		@Column(name="kclb_code", attrName="kclbCode", label="扣车类别编码", isQuery=false),
		@Column(name="kclb_name", attrName="kclbName", label="扣车类别", isQuery=false),
		@Column(name="dele_flag", attrName="deleFlag", label="删除标记", isQuery=false),
		@Column(name="user_code", attrName="userCode", label="更新人编码", isQuery=false),
		@Column(name="user_name", attrName="userName", label="更新人", isQuery=false),
		@Column(name="upd_time", attrName="updTime", label="更新时间", isQuery=false, isUpdateForce=true),
		@Column(name="ip", attrName="ip", label="ip地址", isQuery=false),
	}, orderBy="a.rec_id DESC"
)
public class TblZdKcyy extends DataEntity<TblZdKcyy> {
	
	private static final long serialVersionUID = 1L;
	private String recId;		// 主键
	private String faultCode;		// 原因编码
	private String faultName;		// 原因
	private String kclbCode;		// 扣车类别编码
	private String kclbName;		// 扣车类别
	private String deleFlag;		// 删除标记
	private String userCode;		// 更新人编码
	private String userName;		// 更新人
	private Date updTime;		// 更新时间
	private String ip;		// ip地址
	private String userid;
	private String postid;

	public TblZdKcyy() {
		this(null);
	}
	
	public TblZdKcyy(String id){
		super(id);
	}
	
	public String getRecId() {
		return recId;
	}

	public void setRecId(String recId) {
		this.recId = recId;
	}
	
	@NotBlank(message="原因编码不能为空")
	@Size(min=0, max=10, message="原因编码长度不能超过 10 个字符")
	public String getFaultCode() {
		return faultCode;
	}

	public void setFaultCode(String faultCode) {
		this.faultCode = faultCode;
	}
	
	@NotBlank(message="原因不能为空")
	@Size(min=0, max=50, message="原因长度不能超过 50 个字符")
	public String getFaultName() {
		return faultName;
	}

	public void setFaultName(String faultName) {
		this.faultName = faultName;
	}
	
	@NotBlank(message="扣车类别编码不能为空")
	@Size(min=0, max=2, message="扣车类别编码长度不能超过 2 个字符")
	public String getKclbCode() {
		return kclbCode;
	}

	public void setKclbCode(String kclbCode) {
		this.kclbCode = kclbCode;
	}
	
	@NotBlank(message="扣车类别不能为空")
	@Size(min=0, max=50, message="扣车类别长度不能超过 50 个字符")
	public String getKclbName() {
		return kclbName;
	}

	public void setKclbName(String kclbName) {
		this.kclbName = kclbName;
	}
	
	@Size(min=0, max=1, message="删除标记长度不能超过 1 个字符")
	public String getDeleFlag() {
		return deleFlag;
	}

	public void setDeleFlag(String deleFlag) {
		this.deleFlag = deleFlag;
	}
	
	@Size(min=0, max=20, message="更新人编码长度不能超过 20 个字符")
	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
	@Size(min=0, max=20, message="更新人长度不能超过 20 个字符")
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getUpdTime() {
		return updTime;
	}

	public void setUpdTime(Date updTime) {
		this.updTime = updTime;
	}
	
	@Size(min=0, max=15, message="ip地址长度不能超过 15 个字符")
	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getPostid() {
		return postid;
	}

	public void setPostid(String postid) {
		this.postid = postid;
	}
}